<?php
/**
 * 定义错误码常量
 */

namespace App\Common;


class ResponseCode
{
    // 通用返回码
    const SUCCESS = [0, '处理成功'];
    const FAIL = [1, '处理失败'];
    const PARAM_ILLEGAL = [2, '请求参数有误'];
    const SAVE_FAIL = [3, '操作失败'];
    const REPEAT_OPERATION = [4, '请勿重复操作'];
    const REPEAT_AGAIN = [5, '请稍后重试'];
    const API_ACCESS_ERROR = [15, '接口请求失败'];
    const API_AUTH_FORBIDDEN = [401, '请前往登录'];
    const PHONE_ERR = [501, '手机号格式错误'];
    /**用户错常量错误码定义**/
    const USERNOTFUND = [10000, '用户不存在'];
    const REGISTERERR = [10001, '注册异常'];
    const USEREXIST = [10002, '用户已存在'];
    const REALNAMESTATUSCHECK = [10003, '已实名待审核'];
    const REALNAMESTATUSPASSED = [10004, '已实名通过'];
    const REALNAMESTATUSREJECT = [10005, '实名被驳回'];
    const USER_REAL_NAME_NOT_FINISHED = [10006, '用户未实名'];
    const USER_DISABLE = [10007, '用户被禁用'];
    /**创作者错常量错误码定义**/
    const MERCHANTSNOTFUND = [2000, '创作者不存在'];


    /**文件**/
    const FILE_EXTENSION_ERROR = [20000, '文件格式错误'];
    const FILE_SAVE_ERROR = [20001, '文件保存失败'];

    /**创作者**/
    const MERCHANTS_NOT_FUND = [30000, '创作者不存在'];
    const MERCHANTS_REMAIN_CAST_NUM_NOT_ENOUGH = [30001, '创作者剩余铸造数不足'];

    /**藏品**/
    const SPECIAL_NOT_FUND = [31000, '藏品不存在'];
    const SPECIAL_CANT_NOTIFY = [31001, '藏品不允许编辑'];
    const SPECIAL_CREATE_FAIL = [31002, '藏品新增失败'];
    const SPECIAL_CREATE_WRONG = [31003, '藏品新增错误'];
    const SPECIAL_CREATE_ERROR = [31004, '藏品新增异常'];
    const SPECIAL_UPDATE_FAIL = [31005, '藏品更新失败'];
    const SPECIAL_APPLY_FAIL = [31006, '藏品未通过审核'];
    const SPECIAL_CAST_NOT_FINISH = [31007, '藏品未铸造完成'];
    const SPECIAL_NOT_UP = [31008, '藏品未上架'];
    const SPECIAL_ALBUM_CREATE_FAIL = [31009, '创建专辑失败'];
    const SPECIAL_PRIVILEGE_NOT_ALL_RECEIVED = [31010, '藏品赋能未全部领取'];
    const SPECIAL_PRICE_ILLEGAL = [31011, '藏品价格异常'];
    const SPECIAL_ALBUM_NOT_FOUND = [31012, '藏品专辑不存在'];
    const SPECIAL_ALBUM_NOT_ALLOWED = [31013, '藏品专辑不允许删除'];
    const SPECIAL_IMAGE_NOT_FOUND = [31014, '图片资源不存在'];
    const SPECIAL_CANT_DELETE = [31015, '藏品不允许撤销'];
    const SPECIAL_CANT_CHANGE_STATUS = [31016, '只有已审核的才能操作上下架'];
    const SPECIAL_CANT_STATUS_ERR = [31017, '藏品未铸造完成'];
    const SPECIAL_JOIN_PRIVILEGE_ACTIVITY_ERR = [31018, '藏品已关联特权活动'];

    /**卡券**/
    const COUPON_PARAMS_ERROR = [32000, '卡券参数异常'];
    const COUPON_REQUEST_ERROR = [32001, '卡券请求异常'];
    const COUPON_NOT_FUND = [32002, '卡券不存在'];
    const COUPON_EXPIRED = [32003, '卡券已过期'];
    const COUPON_OUT_OF_STOCK = [32004, '卡券库存不足'];
    const COUPON_PRIVILEGE_FAIL = [32005, '赋能失败'];
    const ENVELOPE_CREATE_FAIL = [32006, '创建红包失败'];
    const ENVELOPE_STOCK_CAST_COUNT_NOT_EQUAL = [32007, '红包数量和藏品铸造数量不一致'];
    const ENVELOPE_END_DATE_ERROR = [32008, '请填写正确的红包有效期'];
    const ENVELOPE_AMOUNT_ERROR = [32009, '请填写正确的红包金额'];
    const ENVELOPE_STOCK_ERROR = [32010, '请填写正确的红包库存'];
    const COUPON_STATUS_ERROR = [32011, '卡券状态异常'];
    const COUPON_FREEZE_FAIL = [32012, '卡券冻结失败'];

    /**订单**/
    const ORDER_EXISTS = [33000, '订单已存在'];
    const ORDER_CREATED_FAIL = [33001, '订单创建失败'];
    const ORDER_DEAL_ERROR = [33002, '订单处理异常'];
    const ORDER_DEAL_FAIL = [33003, '订单处理失败'];

    /**商品**/
    const GOODS_OUT_OF_STOCK = [34000, '商品库存不足'];
    const GOODS_NOT_FUND = [34001, '商品不存在'];
    const GOODS_EXCHANGE_ERROR = [34002, '商品通兑异常'];
    const GOODS_EXCHANGE_FAIL = [34003, '商品通兑失败'];
    const GOODS_MOVE_ERROR = [34004, '商品转移异常'];
    const GOODS_MOVE_FAIL = [34005, '商品转移失败'];
    const GOODS_SELL_STATUS_LOCKED = [34006, '商品已被锁定'];
    const GOODS_MOVE_USER_SAME = [34007, '转移用户和接收用户一致'];
    const GOODS_MOVE_FROM_USER_NOT_FUND = [34008, '转移用户不存在'];
    const GOODS_MOVE_TO_USER_NOT_FUND = [34009, '接收用户不存在'];
    const GOODS_MOVE_FROM_USER_REAL_NAME_UNFINISHED = [34010, '转移用户未实名'];
    const GOODS_MOVE_TO_USER_REAL_NAME_UNFINISHED = [34011, '接收用户未实名'];
    const GOODS_MOVE_TRANSFER_TIME_ERROR = [34012, '转赠时间间隔未满足'];
    const GOODS_SELL_STATUS_UNLOCKED = [34013, '商品未被锁定'];
    const GOODS_MOVE_TO_USER_AMOUNT_ERROR = [34014, '接收用户账户异常'];
    const GOODS_LOCK_SERIAL_NUMBER_NOT_EXISTS = [34015, '商品锁定流水号不存在'];
    const GOODS_LOCK_SERIAL_NUMBER_USED = [34016, '商品锁定流水号已被使用'];
    const GOODS_LOCK_ERROR = [34016, '商品锁定异常'];

    /**ugc赋能**/
    const GOODS_UGC_BIND_PARAMS_ERROR = [35000, 'ugc赋能,缺少卡券/红包信息'];
    const GOODS_UGC_BIND_COUPON_PARAMS_ERROR = [35001, 'ugc赋能,卡券信息错误'];
    const GOODS_UGC_BIND_ENVELOPE_PARAMS_ERROR = [35002, 'ugc赋能,红包信息错误'];
    const GOODS_UGC_BIND_ORDER_DEAL_ERROR = [35003, 'ugc赋能,订单处理异常'];
    const GOODS_UGC_BIND_ORDER_DEAL_FAIL = [35004, 'ugc赋能,订单处理失败'];
    const GOODS_UGC_UNBIND_FAIL = [35005, 'ugc赋能解绑失败'];
    const GOODS_UGC_ORDER_EXISTS = [35006, 'ugc赋能订单已存在'];
    const GOODS_UGC_ORDER_NOT_EXISTS = [35007, 'ugc赋能订单不存在'];
    const GOODS_UGC_ORDER_STATUS_ERROR = [35008, 'ugc赋能订单状态异常'];
    const GOODS_UGC_PRIVILEGE_NOT_ALL_RECEIVED = [35009, 'ugc赋能订单未全部领取'];

    /**杉德宝**/
    const SAND_PAY_REQUEST_ERROR = [36000, '杉德宝请求异常'];

    /**签名校验**/
    const CHECKSIGNERROR = [4000, '签名验证失败'];
    const CREATESIGNERROR = [4001, '加密加签失败'];

    /**入驻申请**/
    const APPLY_FOR_NOT_FUND = [40001, '申请记录不存在'];
    const APPLY_FOR_CHECK_FLAG = [40002, '已审核通过'];
    /**铸造交易**/
    const MERCHANTS_CASTING_SERIAL_NUMBER_EXIST = [50001, '交易流水号已存在'];
    const MERCHANTS_CASTING_REVOKE_NUMBER_ERR = [50002, '撤销流水号不能为空'];
    const MERCHANTS_CASTING_REVOKE_NUMBER_EXIST = [50003, '撤销流水号已存在'];
    const MERCHANTS_CASTING_SERIAL_NUMBER_NOT_EXIST = [50004, '交易流水号不存在'];

}
